package com.seocoo.worker.user;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.seocoo.worker.R;

import java.util.List;

public class ItemAdapter extends BaseQuickAdapter<ItemAdapter.Item,BaseViewHolder> {

    public  static class Item{
        public Item(  int res,String item){
            this.res = res;
            this.item = item;
        }
        int res;
        String item;
    }

    public ItemAdapter(List<Item> list) {
        super(R.layout.user_center_item,list);
    }

    @Override
    protected void convert(BaseViewHolder helper, ItemAdapter.Item item) {
        helper.setImageResource(R.id.iv_icon,item.res).setText(R.id.tv_name,item.item);
    }
}
